$(document).on('pageinit', function(){

    $('#login_form').validate({
        rules: {
            email: {
                required: true
            },
            password: {
                required: true
            }
        },
        messages: {
            email: {
                required: "Enter your email."
            },
            password: {
                required: "Enter your password."
            }
        },
        errorPlacement: function (error, element) {
            if (element.is("input") && !element.is('input[type="hidden"]'))
                error.insertAfter(element.parent());
            else
                error.insertAfter(element);
        }
    });

});